<?php
return array(
    'controllers' => array(
        'invokables' => array(
        	'Home' => 'Shop\Controller\HomeController',
        	'Catalog' => 'Shop\Controller\CatalogController',
        	'Product' => 'Shop\Controller\ProductController',
        	'Admin' => 'Shop\Controller\AdminController',
        	'Auth' => 'Shop\Controller\AuthController',
        ),
    ),

    // The following section is new and should be added to your file
    'router' => array(
        'routes' => array(
        	'shop' => array(
                'type'    => 'Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        '__NAMESPACE__' => 'Shop\Controller',
                        'controller'    => 'Home',
                        'action'        => 'index',
                    ),
                ),
        	),
        	'catalog' => array(
        		'type'    => 'Literal',
        		'options' => array(
        			'route'    => '/catalog',
        			'defaults' => array(
        				'__NAMESPACE__' => 'Shop\Controller',
        				'controller'	=> 'Catalog',
        				'action' 		=> 'index',
        			),
        		),
        		
        	),
    		'product' => array(
    			'type'    => 'Literal',
    			'options' => array(
    				'route'    => '/product',
    				'defaults' => array(
    					'__NAMESPACE__' => 'Shop\Controller',
    					'controller'	=> 'Product',
    					'action' 		=> 'index',
    				),
    			),  			
    		),
        	'auth' => array(
        		'type'    => 'segment',
        		'options' => array(
        			'route'    => '/auth[/:action]',
        			'constraints' => array(
        				'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
        			),
        			'defaults' => array(
        				'controller' => 'Auth',
        			),
        		),
        	),
        ),
    ),

    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map' => array(
            'shop/layout'          	=> __DIR__ . '/../view/layout/layout.phtml',
            'shop/home/index' 		=> __DIR__ . '/../view/shop/home/index.phtml',
        	'shop/catalog/gridview' => __DIR__ . '/../view/shop/catalog/gridview.phtml',
        	'shop/catalog/listview' => __DIR__ . '/../view/shop/catalog/listview.phtml',
        	'shop/custom/banner'	=> __DIR__ . '/../view/shop/custom/banner.phtml',
        	'shop/custom/mainmenu'	=> __DIR__ . '/../view/shop/custom/mainmenu.phtml',
        	'shop/custom/footer'	=> __DIR__ . '/../view/shop/custom/footer.phtml',
            'error/404'             => __DIR__ . '/../view/error/404.phtml',
            'error/index'           => __DIR__ . '/../view/error/index.phtml',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
    ),
	'service_manager' => array(
		'factories' => array(
			'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
		),
	),
	'translator' => array(
		'locale' => 'en_US',
		'translation_file_patterns' => array(
			array(
				'type'     => 'gettext',
				'base_dir' => __DIR__ . '/../language',
				'pattern'  => '%s.mo',
			),
		),
	),
);